-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
14 скрытие части юзердаты от пользователя #23
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "14-\u0441\u043A\u0440\u044B\u0442\u0438\u0435-\u0447\u0430\u0441\u0442\u0438-\u044E\u0437\u0435\u0440\u0434\u0430\u0442\u044B-\u043E\u0442-\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F"
Conversation
💩 Code linting failed, use |
Coverage Report
Summary
|
💩 Code linting failed, use |
💩 Code linting failed, use |
💩 Code linting failed, use |
1 similar comment
💩 Code linting failed, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Так, короче, давай откатим коммит, потому что я только сейчас увидел коммент Семена апрельский, где он говорил добавлять Query-параметр
Мне это показалось странным, так как не совпадало с изначальным ТЗ
Можешь просто откатить, по идее, коммит, и запросить мое ревью
Прошу прощения
2682954
to
b29ffd4
Compare
💩 Code linting failed, use |
…ithub.com/profcomff/userdata-api into 14-скрытие-части-юзердаты-от-пользователя
💩 Code linting failed, use |
# Conflicts: # .idea/misc.xml # .idea/userdata-api.iml
убери idea из коммента |
cls, | ||
source: type[Any], | ||
) -> core_schema.CoreSchema: | ||
def __get_pydantic_core_schema__(cls, source: type[Any], handler: Callable) -> core_schema.CoreSchema: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pydantic import GetCoreSchemaHandler, TypeAdapter
class Username(str):
@classmethod
def __get_pydantic_core_schema__(
cls, source_type: Any, handler: GetCoreSchemaHandler
) -> CoreSchema:
return core_schema.no_info_after_validator_function(cls, handler(str))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нужно использовать тип GetCoreSchemaHandler а не Callable
Изменения
Изменил класс Param и ручку param.get
Детали реализации
Добавил в класс Param поле is_hidden (по умолчанию True = скрыт).
Ручка param.get теперь работает следующим образом:
Пока я не тестил работу ручки, ибо затуп был лютый с аутентификацией и базой данных
Check-List
black
иisort
для Back-End илиPrettier
для Front-End?